<template>
  <div>
    <el-table


      align="left"
      :data="CommitData"
      style="width: 100%"
      :default-sort = "{prop: 'date', order: 'descending'}"
    >
      <el-table-column

        prop="_class"
        label="教学班"
        sortable
      >
      </el-table-column>
      <el-table-column
        prop="Class_name"
        label="课程名称"
        sortable
      >
      </el-table-column>

      <el-table-column
        prop="teacher"
        label="任课老师"

        :formatter="formatter">
      </el-table-column>


      <el-table-column
        prop="number"
        label="人数"
        sortable
      >
      </el-table-column>
      <el-table-column
        label="操作"
      >
        <template slot-scope="scope" >

          <el-button type="text" size="small" @click="goDetails">详情</el-button>

        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<style>

</style>
<script>
  export default{
    data(){
      return{
        CommitData:[{
          Class_name:"HTML网页设计",
          _class:"ASH",
          teacher:"孟辉",
          number:"1",
        }],
      }

    },
    methods:{
      goDetails(){
        this.$router.push('/CommitDetails')
      },

    }
  }
</script>
